﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMTPAPI.Interfaces;
using System.Net.Mail;

namespace SMTPAPI.InterfaceImplementation
{
    public class AttachAttachment : IAttachAttachment
    {
        public void AttachedAttachment(IList<string> attachmentList, MailMessage mailMessage)
        {
            if (attachmentList != null)
            {
                foreach (string att in attachmentList)
                {
                    Attachment attchement = new Attachment(att);
                    mailMessage.Attachments.Add(attchement);
                }
            }
        }
    }
}
